#ifndef				MACRO_HH_
# define			MACRO_HH_

//					Names and Paths

# define 			WIN_NAME   				"Gomoku"
# define			WHITE_STONE_PATH		"images/whiteStone.png"
# define			BLACK_STONE_PATH		"images/blackStone.png"
# define			WHITE_WINNING_PATH		"images/whiteWinningImage.png"
# define			BLACK_WINNING_PATH		"images/blackWinningImage.png"
# define			GOBAN_PATH 				"images/goban.png"
# define			MENU_PATH				"images/menu.png"

//					Values

# define 			WIN_SIZE    			800
# define			INC 	   				26
# define			GOBAN_ORIGIN_COORD		150
# define			GOBAN_END_COORD			650
# define			GOBAN_FIRST_BOX_COORD 	154
# define			GOBAN_LAST_BOX_COORD 	630
# define			GOBAN_FIRST_BOX_NUM		0
# define			GOBAN_LAST_BOX_NUM		360
# define			GOBAN_BOX_PER_LINE		19
# define 			WIN_STATE				31
# define			TRUE					1i64
# define			FALSE					0i64

//					Directions

# define			RIGHT 					0
# define			LEFT 					1
# define			UP 						2
# define			DOWN 					3
# define			DIAG_UP_LEFT 			4
# define			DIAG_DOWN_RIGHT			5
# define			DIAG_DOWN_LEFT 			6
# define			DIAG_UP_RIGHT 			7

//					Binary Masks
					
					//Take Masks
# define			TAKE_PATTERN			0x07
# define			BLACK_PATTERN			0x03
# define			WHITE_PATTERN			0x04

					//Winning Masks
# define			WIN_PATTERN				0x0F
# define			BLACK_WIN_PATTERN		0x00

					//Double Three
# define			DOUBLE_THREE_PATTERN_1	0x06
# define			DOUBLE_THREE_PATTERN_2	0x05
# define			DOUBLE_THREE_BLACK		0x00

//					AI Mask

#define				WHITE_LINE		0x1
#define				BLACK_LINE		0x2
#define				WHITE_TAKE		0x4
#define				BLACK_TAKE		0x8

//					Functions

# define 			CONV_COORD(x)   		((((x) - GOBAN_FIRST_BOX_COORD)) / (INC))
# define			COORD_VALIDITY(x)		(((x) >= GOBAN_ORIGIN_COORD && (x) <= GOBAN_END_COORD) ? true : false)
# define			KEY_VALIDITY(x)			((((x) >= GOBAN_FIRST_BOX_NUM && (x) <= GOBAN_LAST_BOX_NUM)) ? true : false) 		
# define 			BOX_NUM(x, y)			((((CONV_COORD(y)) * GOBAN_BOX_PER_LINE)) + (CONV_COORD(x)))
# define			WHO_WON(x)				((((x) >> 1) & 1) ?  WHITE_WINNING_PATH : BLACK_WINNING_PATH)
# define			LEFT_DIRECTION(x)		(((x) == 0 || (x) == 5 || (x) == 7) ? true : false)
# define			RIGHT_DIRECTION(x)		(((x) == 1 || (x) == 4 || (x) == 6) ? true : false)

//					Types

typedef	struct		MyInt
{
	long long int	directions;
	char			states;
}Box;

#endif;